<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ page session="false" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="ww" uri="/webwork" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>${roomInfo[0].name}</title>
<link type="text/css" rel="stylesheet" href="/css/style.css" />
<link type="text/css" rel="stylesheet" href="/css/removefocus.css" />
<link type="text/css" rel="stylesheet" href="/css/face.css" />
<script type="text/javascript" src="/js/jquery-1.7.1.min.js" charset="utf-8"></script>
<!--[if IE 6]>
<script type="text/javascript" language="javascript" src="/js/DD_belatedPNG.js"></script>
<script type="text/javascript">
       DD_belatedPNG.fix('img,.Hleft,.listnav li a:hover,.Hrtopbg,.Hbotbg,.footer,.mainright,a.browse,#fzgc #a,#ztgs #j,.Scrollbar-Handle')
</script>
<![endif]-->
<script type="text/javascript" src="/js/json2.js" charset="utf-8"></script>
<script type="text/javascript" language="javascript" src="/js/lb.js"></script>	
<script type="text/javascript" language="javascript" src="<c:url value="/js/room/popWin.js"/>"></script>

</head>
<body>
<div class="wrap leftBigBg">
    	<div class="leftBar">
        	<h2><div class="tit">房间介绍</div>
        	<c:if test="${roomInfo[0].roomMaster==1 }"><a class="link1" href="/room!toRoomEdit.jspa?roomid=${roomInfo[0].room_id}"  >编辑</a></c:if>
        	<a class="link2 intoroom" href="javascript:void(0);"><i></i>直播间</a></h2>
        	<div class="bd">
            	<div class="avatar">
                	<a href="javascript:void(0);">
                	<!-- 
                	<img src="images/avatar_1.jpg" />
                	 -->
                	<c:if test="${roomInfo[0].imgURL!=''}">
                	<img src="${roomInfo[0].imgURL}" alt="" width="150" height="150" />
                	</c:if>
                	<c:if test="${roomInfo[0].imgURL==''}">
                	<img src="/images/default.jpg" alt="" width="150" height="150" />
                	</c:if>
                	</a>
                </div>
                <div class="info">
                	<p>房间名称：${roomInfo[0].name}</p>
                    <p>房间 ID ：${roomInfo[0].room_id}</p>
                    <p>房间收藏：<var class="localCache" id="localRoomCollect_${roomInfo[0].room_id}">0</var>人</p>
                    <p class="td1" style="word-break:break-all;width:190px;">${roomInfo[0].description}</p>
                	<a class="but2" href="javascript:void(0)" onclick="showPopWin(this,'shareRoomPop',shareRoomFun('${roomInfo[0].name}','${roomInfo[0].room_id}'),'sourceObjLeftBown');return false;"><i></i>分享</a>
                	<c:choose>

   						<c:when test="${userid !=-1}">
   						<a class="but1" href="javascript:favroom(${roomInfo[0].room_id},false);"  id="favroom_${roomInfo[0].room_id}"><i></i><span id="favroom">收藏</span></a>
   						</c:when>
   
   						<c:otherwise> 
   						<a class="but1" href="javascript:favroom(${roomInfo[0].room_id},true);"  id="favroom_${roomInfo[0].room_id}"><i></i>收藏</a> 
   						</c:otherwise>
  
					</c:choose>
                </div>
            </div>
            <c:if test="${starInfoSize!=0}" >
	            <h2><div class="tit2">明星推荐</div>
	            <c:if test="${roomInfo[0].roomMaster==1 }">
	            	<a class="link1" href="/room!toAddStarPage.jspa?roomid=${roomInfo[0].room_id}">推荐</a>
	            </c:if><a class="link3" href="/room!starlist.jspa?roomid=${roomInfo[0].room_id}">更多>></a></h2>
            
	        	<ul>
	            	<c:if test="${roomInfo[0].roomMaster==1 and empty starInfo[0] }">
		            	<li>
		            		<img src="images/ts_3.jpg" />
		                </li>
	            	</c:if>
	           		<c:if test="${roomInfo[0].roomMaster==0 and empty starInfo[0] }">
		           		<li>
		           			<img src="images/ts_5.jpg" />
		                </li>
	           		</c:if>
	                <c:forEach items="${starInfo[0]}" var="his" varStatus="vs">
		                <li>

			                <a href="${his.url}" target="_blank" style="text-decoration:none;" >
		                    	<img src="http://zone1.ggimg.cn/custom/portrait/${his.user_id}.jpg" name="infocard${his.user_id}" width="40" height="40" alt="" title="${his.nickname}"/>
		                        <p title="${his.nickname}" name="infocard${his.user_id}">${his.nicknamelen}</p>
		                    </a>

		                </li>
	           	 	</c:forEach> 
	            </ul>
	         </c:if>
        </div>
        <div class="rightBar">
        	<div class="ltRoom">
            	<h2><div class="tit">房间活动</div>
            	<!-- onclick = "show('fd');activeTag(-1);return false;"  -->
            	<c:if test="${roomInfo[0].roomMaster==1 }">
            		<a href="/room!toAddActivePage.jspa?roomid=${roomInfo[0].room_id}" class="link1">发布新活动</a>
            	</c:if>
            	<a class="link2" href="/room!activelist.jspa?roomid=${roomInfo[0].room_id}" >更多(<span>${activeInfoCount }</span>)</a></h2>
            	<div class="bd">
                	<div class="lunbo" id="idContainer2">
                	<c:if test="${roomInfo[0].roomMaster==1 and empty activeInfo }">
              			<img class="ts_1" src="images/ts_1.jpg" />
                  	</c:if>
		          	<c:if test="${roomInfo[0].roomMaster==0 and empty activeInfo }">
               			<img class="ts_1" src="images/ts_4.jpg" />
                    </c:if>
                        <table id="idSlider2">
                            <tr>
					         	<c:forEach items="${activeInfo}" var="his" varStatus="vs">
					         		 <td id="actice${his.id}" class="imgTD">
					         		 	<div class="ltImg">
	                                        <a href="javascript:void(0);" onclick="gotoActivePage(${roomid },${oemid },${his.id});return false;" class="ltImg-img" <c:if test="${his.room_id!=roomInfo[0].room_id}">title="转播自房间：${his.room_id}"</c:if>>
	                                        	<c:if test="${his.imgURL ne '' }">
	                                        		<img id="preactiveAvatar${his.id}" src="${his.imgURL}" width="216" height="101"/>
           										</c:if>
	                                        	<c:if test="${his.imgURL eq '' }">
	                                        		<img id="preactiveAvatar${his.id}" src="/images/active_small.jpg" width="216" height="101"/>
           										</c:if>
	                                        </a>
	                                         <c:if test="${his.period==1 }">
						                    <p class="ltImg-txt">正在进行</p>  
						                    </c:if>             
						                    <c:if test="${his.period==4||his.period==0 }">
						                    <p class="ltImg-txt">${his.start_time_str}</p> 
						                    </c:if>                  
						                    <c:if test="${his.period==3 }">
						                    <p class="ltImg-txt">即将开始</p> 
						                    </c:if>                  
						                    <c:if test="${his.period==5 }">
						                    <p class="ltImg-txt">${his.start_time_str}</p> 
						                    </c:if>
						                    <c:if test="${his.period==2 }">
						                    <p class="ltImg-txt">活动结束</p> 
						                    </c:if>
	                                        <c:if test="${his.room_id!=roomInfo[0].room_id}">
	                                        	<p class="ltImg-txt2" title="转播自房间：${his.room_id}">【转】</p>
        									</c:if>
        									<%-- 等中奖了再写吧！！！
        									<p class="ltImg-txt4">50000000券</p>
        									 --%>
	                                        <div class="ltImg-info">
	                                        	<h3 style="table-layout:fixed; word-break: break-all;"><i></i><a href="javascript:void(0);" style="table-layout:fixed; word-break:break-all;">${his.active_subject}</a></h3>


	                                            <p class="lenCon" onclick="gotoActivePage(${roomid },${oemid },${his.id});return false;" style="cursor:pointer;table-layout:fixed; word-break: break-all;">${his.active_content_len}</p>
	                                            <div class="butBox">
	                                            	<div id="joinerStat${his.id}">
	                                            	<input type="hidden" id="starTimeLong_${his.id}" value="${his.start_time_long}" />
	                                            	<c:if test="${his.period==2 }">
						                        		<a  id="preactiveA${his.id}" class="but2"  id="preactiveA${his.id}" href="javascript:void(0);">已结束</a>
						                        	</c:if>
						                        	<c:if test="${his.period==4 || his.period==5 }">
						                        		<c:if test="${his.joinerStat==0}">
						                        			<a  id="preactiveA${his.id}" class="but2"  id="preactiveA${his.id}" href="javascript:void(0);">已报名</a>
						                        		</c:if>
						                        		<c:if test="${his.joinerStat==1}">
						                        			<a  id="preactiveA${his.id}" class="but1"  id="preactiveA${his.id}" href="javascript:subJoiner(${his.id},${his.room_id });">报名</a>
						                        		</c:if>
						                            </c:if>       
						                        	<c:if test="${his.period==3||his.period==1}">
						                        	  	<a class="but3 intoroom RCFlag" title="${his.room_id}" href="javascript:void(0);" id="preactiveA${his.id}">
						                            		入场
						                            	</a>
						                        	</c:if>						                        	
	                                                <p class="txt" id="joinAmount${his.id}">${his.join_amount}</p>
	                                                </div>
	                                                
	                                                <a class="link1" href="javascript:void(0)" onclick="showPopWin(this,'shareActivitiePop',shareActivitieFun('${roomInfo[0].name}','${roomInfo[0].room_id}','${his.period }','${his.active_subject}','${his.join_amount}','${his.start_time }'),'sourceObjLeftBown');return false;"><i></i>分享</a>
	                    							<a class="link2" href="javascript:void(0);" onclick="replyActive(${his.id},${roomInfo[0].roomMaster},${roomInfo[0].room_id},${userid},${his.room_id});return false;"><i></i>转播</a>
	                    							<c:if test="${roomInfo[0].roomMaster==1 and his.room_id==roomInfo[0].room_id}">
	                    							<a class="link3" href="javascript:void(0)">[<span style="cursor:pointer;" onclick = "editActive(${his.id},${his.room_id});return false;">编辑</span>]</a>
                                                	<a class="link4" href="javascript:void(0)">[<span style="cursor:pointer;" onclick="subdelActive(${his.id},${his.photoid});return false;">删除</span>]</a>
                                                	</c:if>
                                                	<c:if test="${roomInfo[0].roomMaster==1 and his.room_id!=roomInfo[0].room_id}">
                                                	<a class="link4" href="javascript:void(0)">[<span style="cursor:pointer;" onclick="zbDelActive(${his.id},${his.room_id},${roomInfo[0].room_id });return false;">删除</span>]</a>
                                                	</c:if>
	                                            </div>
	                                        </div>
	                                    </div>
	                                   	<input type="hidden" id="ac_photo_name_${his.id}" value="${his.photo_name}">
						                <input type="hidden" id="ac_start_time_${his.id}" value="${his.start_time}">
						                <input type="hidden" id="ac_end_time_${his.id}" value="${his.end_time}">
						                <input type="hidden" id="ac_photoid_${his.id}" value="${his.photoid}">
						                <input type="hidden" id="ac_centerflag_${his.id}" value="${his.center_flag}">
	                                </td>
					         	</c:forEach>
                            </tr>
                        </table>
                    	<ul id="idNum" class="num"></ul>
                    </div>
                </div>
                <input type="hidden" id="room_id" value="${roomid }">
	            <input type="hidden" id="oemid" value="${oemid}">
                <h2><div class="tit">房间话题</div><span style="display:none;">（当日帖子：10；当日说说：20000）</span></h2>
                <ww:action name="topic!index" executeResult="true" namespace="/topic" ignoreContextParams="true" >
                	<ww:param name="roomId">${roomid}</ww:param>
                	<ww:param name="roomMaster">${roomInfo[0].roomMaster}</ww:param>
                	<ww:param name="userId">${userid}</ww:param>
                </ww:action>
            </div>
            <div class="rtRoom">
            	<jsp:include page="top/top.jsp?roomId=${roomInfo[0].room_id}&roomMaster=${roomInfo[0].roomMaster}&userId=${userid}" flush="true"/> 
            </div>
        </div>
    </div>
 	<jsp:include page="popDiv.jsp" />
</body>
<script type="text/javascript" language="javascript" src="/js/lunbo.js"></script>
<script type="text/javascript" language="javascript" src="/js/room/roomUtil.js"></script>
<!-- 说说 -->
 <script type="text/javascript" language="javascript" src="<c:url value="/js/shuoshuo.js"/>"></script>
 <script type="text/javascript" language="javascript" src="<c:url value="/js/post.js"/>"></script>
 <script type="text/javascript" language="javascript" src="<c:url value="/js/bqselect.js"/>"></script>
 <script type="text/javascript">
         <!--页面加载完成时执行 -->
         $(document).ready(function(){
            $("#message_face").jqfaceedit("publishShuoshuoText"); //添加表情
         	findAllShuoShuo(1);//加载shuoshuo 第一页
         }); 
        
 </script> 
 <!-- END -->
 <!--排行榜 -->
 <script type="text/javascript" language="javascript" src="<c:url value="/js/top.js"/>"></script>
    <script type="text/javascript">
    	  $(document).ready(function(){
           topQueryAjax('popularity','week');
           topQueryAjax('contribution','week');
           
         }); 
    </script>
 <!-- END -->
<script type="text/javascript" language="javascript" src="/js/infocard.js"></script>
<script type="text/javascript" language="javascript" src="/js/room/starlistUtil.js"></script>
</html>

